var app = getApp()
Page({
  data: {
    userInfo: {}
  },
  /**
   * 跳转页面
   */
  toPage: function(e){
    var targetUrl = e.currentTarget.dataset.url;
    wx.navigateTo({
      url: targetUrl
    })
  },
  onLoad: function () {
    var that = this
    var url = app.data.url
    var openid = wx.getStorageSync('user').openid
    //调用应用实例的方法获取全局数据-头像，昵称
    app.getUserInfo(function(userInfo){
      that.setData({
        userInfo:userInfo
      });
    })
    //是否绑定手机号
    wx.request({
      url: ''+url+'/shop/Member/Get9',
      data: {
        openid: openid
      },
      success: function (res) {
       console.log(res)
      },
      error: function (res) {
        console.log(res)
      }
    })
  },
  /**
   * 打电话
   */
  makeCall: function(){
    wx.makePhoneCall({
      phoneNumber: '1340000' //仅为示例，并非真实的电话号码
    })
  }
});